﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Polls;

namespace NosoiFigthersWeb.PollDesigner {
	public partial class Properties : System.Web.UI.Page {
		protected void Page_Load(object sender, EventArgs e) {
			if (!IsPostBack) {
				title.Text = (Session["poll"] as Poll).Title;
				description.Text = (Session["poll"] as Poll).Description;
			}

			// TODO:
			// insertion of diseases names into dropdownlist
		}
		protected void Save_Click(object sender, EventArgs e) {
			(Session["poll"] as Poll).Title = title.Text;
			(Session["poll"] as Poll).Description = description.Text;
			//(Session["Poll"] as Poll).Disease     = disease.Text;

			Response.Redirect("Properties.aspx");
		}
	}
}